#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
主题: 返回多个值的函数
问题: 你希望构造一个可以返回多个值的函数
提示 : 
    1. 看上去返回了多个值，实际上是先创建了一个元组然后返回的
"""

def recipe1():
    x = myfun()
    print(f"{x = }")

    a, b, c = myfun()
    print(f"{a = }")
    print(f"{b = }")
    print(f"{c = }")

def recipe2():
    a = (1, 2)
    print(f"{a = }") 

    b = 1, 2
    print(f"{b = }")

def myfun():
    return 1, 2, 3

def main():
    print('recipe1'.center(20, '*'))
    recipe1()
    print('recipe2'.center(20, '*'))
    recipe2()

if __name__ == '__main__':
    main()   